namespace CSharpePro._1028;
public class User
{
// 只包含字段/属性和构造函数
    public string Username { get; }
    public string Password { get; private set; }

    public User(string username, string password)
    {
        Username = username ?? throw new ArgumentNullException(nameof(username));
        Password = password ?? throw new ArgumentNullException(nameof(password));
    }
}